In [1]:
import numpy as np
import xarray as xr
In [4]:
ds=xr.open_dataset('https://salishsea.eos.ubc.ca/erddap/griddap/ubcSSnBathymetry2V1')
In [5]:
ds
Out[5]:
2 dimensions,2 coordinates, 3 variables
In [21]:
ds.data_vars
Out[21]:
In [6]:
ds.longitude
Out[6]:
In [7]:
ds.latitude
Out[7]:
In [8]:
ds.bathymetry
Out[8]:
In [9]:
ds.latitude.shape
Out[9]:
In [10]:
ds.longitude.shape
Out[10]:
In [11]:
ds.bathymetry.shape
Out[11]:
In [12]:
ds.latitude.values
Out[12]:
In [13]:
ds.longitude.values
Out[13]:
In [15]:
ds.bathymetry.values
Out[15]:
In [17]:
ds.longitude>=-126
Out[17]:
In [18]:
ds.longitude.values[-126:-121]
Out[18]:
In [19]:
ds.longitude.values[46:48,-126:-121]
Out[19]:
In [22]:
ds.latitude.values[-126:-121,46:48]
Out[22]:
In [23]:
ds.longitude.values[-126:-121,46:48]
Out[23]:
In [ ]: